home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
ctlib100.zip
/
INSTALL.LZH
/
CTQUEUES.INT
< prev
next >
Wrap
Text File
|
1996-10-12
|
2KB
|
51 lines
{**************************************************************************}
{* BitSoft Development, L.L.C. *}
{* Copyright (C) 1995, 1996 BitSoft Development, L.L.C. *}
{* All rights reserved. *}
{* Queue objects unit *}
{* Version 1.0.7 *}
{**************************************************************************}
unit ctQueues;
{$X+}
interface
uses Objects,
Containr, ctLists, ctTypes;
type
PQueue = ^TQueue;
TQueue = object(TList)
function Enqueue (Item : Pointer) : Boolean; virtual;
function Front : PListNode; virtual;
function Rear : PListNode; virtual;
function Remove : Pointer; virtual;
end; { TQueue }
type
PDoubleEndedQueue = ^TDoubleEndedQueue;
TDoubleEndedQueue = object(TQueue)
function RemoveFirst : Pointer; virtual;
function RemoveLast : Pointer; virtual;
end; { TDoubleEndedQueue }
procedure RegisterQueues;
const
RQueue : TStreamRec = (
ObjType : idQueue;
VmtLink : Ofs(TypeOf(TQueue)^);
Load : @TQueue.Load;
Store : @TQueue.Store);
RDoubleEndedQueue : TStreamRec = (
ObjType : idDoubleEndedQueue;
VmtLink : Ofs(TypeOf(TDoubleEndedQueue)^);
Load : @TDoubleEndedQueue.Load;
Store : @TDoubleEndedQueue.Store);
implementation
end.